/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import request from '@/utils/request';
import isArray from 'lodash/isArray';

export async function getWzgList(params: any) {
  return request('/courier/feedbackList', {
    method: 'POST',
    data: params,
  }).then(({ data }: any) => {
    const { list, page, total } = data;
    if (isArray(list) && list.length > 0) {
      return {
        total,
        success: true,
        data: list,
        current: page,
      };
    }
    return {};
  });
}

export async function wzgSave(params: any) {
  return request('/courier/feedbackReply', {
    method: 'POST',
    data: params,
  });
}
